import type { BannerItem, CategoryItem, HotItem, GuessItems } from '@/types/home'
import { http } from '@/utils/http'

// 轮播图接口
export const getBannerAPI = (distributionSite: number) => {
  return http<BannerItem[]>({
    url: '/home/banner',
    method: 'GET',
    data: {
      distributionSite,
    },
  })
}

// 首页分类接口
export const getHomeCategoryAPI = () => {
  return http<CategoryItem[]>({
    url: '/home/category/mutli',
    method: 'GET',
  })
}
// 热门推荐接口
export const getHomeHotAPI = () => {
  return http<HotItem[]>({
    url: '/home/hot/mutli',
    method: 'GET',
  })
}
// 猜你喜欢接口
export const getHomeGuessAPI = (page: number, pageSize: number) => {
  return http<GuessItems>({
    url: '/home/goods/guessLike',
    method: 'GET',
    data: {
      page,
      pageSize,
    },
  })
}
